package org.example.baseinfo.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.example.baseinfo.service.ISchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SchoolTaskJob extends IJobHandler {

    @Autowired
    private ISchoolService schoolService;

    @Override
    @XxlJob("synTask")
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("自动同步");
        schoolService.syn();
        return ReturnT.SUCCESS;
    }


}
